<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://doc.hyperf.io
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
use Hyperf\HttpServer\Router\Router;

Router::addRoute(['GET', 'POST', 'HEAD'], '/', 'App\Controller\IndexController@index');
Router::post('/user/login', 'App\Controller\Auth\LoginController@login');
Router::post('/user/register', 'App\Controller\Auth\RegisterController@register');
//个人资料
Router::addGroup('/user/', function () {
    Router::get('info','App\Controller\Auth\UserController@info');
    Router::post('logout', 'App\Controller\Auth\UserController@logout');
    Router::get('elasticsearch', 'App\Controller\Auth\UserController@elasticsearch');
}, [
    'middleware' => [App\Middleware\JwtAuthMiddleware::class]
]);



Router::post('/approvalFlow/record', 'App\Controller\Api\ApprovalFlow@record');
Router::post('/approvalFlow/recordCount', 'App\Controller\Api\ApprovalFlow@recordCount');

Router::addGroup('/api/v1', function () {
    Router::post('/sign/person/downPersonListByDeviceMac','App\Controller\Api\FaceDeviceController@downPersonListByDeviceMac');
    Router::post('/sign/person/downPersonCountByDeviceMac', 'App\Controller\Api\FaceDeviceController@downPersonCountByDeviceMac');
    Router::post('/sign/person/updatePerson', 'App\Controller\Api\FaceDeviceController@updatePerson');
    Router::post('/sign/person/dailyAttendance', 'App\Controller\Api\FaceDeviceController@dailyAttendance');
    Router::post('/sign/record/uploadRecordFromApp', 'App\Controller\Api\FaceDeviceController@uploadRecordFromApp');
    Router::post('/sign/record/getDevicePermission', 'App\Controller\Api\FaceDeviceController@getDevicePermission');


    Router::post('/sign/person/downBlacklistByDeviceMac', 'App\Controller\Api\FaceDeviceController@downBlacklistByDeviceMac');
    Router::post('/sign/person/generateQrCodeByOnBoardingInfo', 'App\Controller\Api\FaceDeviceController@generateQrCodeByOnBoardingInfo');
    Router::post('/sign/person/getQrCodeStatus', 'App\Controller\Api\FaceDeviceController@getQrCodeStatus');
    Router::post('/sign/person/uploadDeviceFace', 'App\Controller\Api\FaceDeviceController@uploadDeviceFace');
    Router::post('/sign/person/uploadFingerPrint', 'App\Controller\Api\FaceDeviceController@uploadFingerPrint');
});
